<template>
	<view>
		<view class="zy-protocol">
			<view class="">
				{{shopData.descs}}
			</view>
			<view class="">
				<image :src="frontBaseUrl+shopData.qqCode" @click="longtap(shopData.qqCode)" mode="aspectFit"></image>
				<view class="">
					QQ二维码
				</view>
			</view>
			<view class="">
				<image :src="frontBaseUrl+shopData.qrCode" @click="longtap(shopData.qrCode)" mode="aspectFit"></image>
				<view class="">
					微信二维码
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		FRONT_BASE_URL
	} from '@/common/util.js'
	export default {
		data() {
			return {
				shopData: {},
				frontBaseUrl: FRONT_BASE_URL,
			};
		},
		onLoad(data) {
			if (data.navData) {
				var data = JSON.parse(data.navData); // 字符串转对象
				this.shopData = data
			}
		},
		methods: {
			longtap(url) {
				wx.previewImage({
				    urls: [FRONT_BASE_URL + url]
				})
			}
		}
	}
</script>

<style lang="scss">
	@import '@/common/zywork-main.scss';

	.zy-protocol {
		width: 100%;
		max-height: 100%;
		background-color: $primary-backcolor;

		view {
			padding: 10rpx 15rpx;
			@include flex-center-column;
			align-items: center;

			image {
				width: 500rpx;
				height: 500rpx;
			}
		}

	}
</style>
